package cc.yaomm.service.basic.entity.user;

import cc.yaomm.common.basic.base.SuperEntity;
import cc.yaomm.common.basic.enums.AuthLevelEnum;
import cc.yaomm.common.biz.enums.SystemEnum;
import cc.yaomm.common.biz.enums.ServeTypeEnum;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

/**
 * Created by XQL on 2021/6/9.
 */
@Data
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName("resources")
public class Resources extends SuperEntity {

    /**
     * CHAR(32)     NOT NULL COMMENT '资源编码',
     */
    private String code;

    /**
     * VARCHAR(128) NOT NULL COMMENT '资源名称',
     */
    private String name;

    /**
     * VARCHAR(256) NOT NULL COMMENT '资源路径',
     */
    private String url;

    /**
     * VARCHAR(8)   NOT NULL COMMENT '请求方式'
     */
    private String method;

    /**
     * VARCHAR(16)  NOT NULL COMMENT '所属服务'
     */
    private ServeTypeEnum ownerServe;

    /**
     * VARCHAR(16)  NOT NULL COMMENT '所属应用',
     */
    private SystemEnum ownerApp;

    /**
     * TINYINT      NOT NULL DEFAULT 3 COMMENT '认证级别 1-开放 2-登录 3-鉴权'
     */
    private AuthLevelEnum authLevel;
}
